/**
 * <pre>
 * Title: 		Sequence.java
 * Author:		linriqing
 * Create:	 	2009-7-25 下午02:12:18
 * Copyright: 	Copyright (c) 2009
 * Company:		Shenzhen Helper
 * <pre>
 */
package com.hengpeng.common.sequence.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

import com.hengpeng.common.persist.entity.AbstractEntity;
import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputPattern;
import com.hengpeng.common.web.annotation.HtmlInputType;

/**
 * <pre>
 * 流水号信息
 * </pre>
 * @author linriqing
 * @version 1.0, 2009-7-25
 */
@Entity(name="com.hengpeng.common.sequence.entity.Sequence")
public class Sequence extends AbstractEntity
{
	private static final long serialVersionUID = -350096206545947549L;

	/**
	 * 缓存的流水号个数，即每次从持久层获取的流水号个数
	 */
	@HtmlInput(label = "缓存的流水号个数", maxLength = 100, type = HtmlInputType.TEXT, pattern = HtmlInputPattern.INT, index = 4, nullable = false)
	private java.lang.Integer cacheCount;

	/**
	 * 当前的流水号计数
	 */
	@Column(nullable = false)
	@HtmlInput(label = "当前的流水号计数", maxLength = 100, type = HtmlInputType.LABEL, index = 2, nullable = false)
	private java.lang.Long indexNum;

	/**
	 * 流水号最大允许的计数，达到改数后从1开始循环
	 */
	@HtmlInput(label = "流水号最大允许的计数", maxLength = 100, type = HtmlInputType.TEXT, pattern = HtmlInputPattern.INT, index = 3, nullable = false)
	private java.lang.Long modMaxNum;

	/**
	 * 流水号名称
	 */
	@Id
	@Column(length = 100)
	@HtmlInput(label = "流水号名称", maxLength = 100, type = HtmlInputType.TEXT, index = 1, nullable = false)
	private java.lang.String name;

	/**
	 * @return 缓存的流水号个数，即每次从持久层获取的流水号个数
	 */
	public java.lang.Integer getCacheCount()
	{
		return cacheCount;
	}

	@Override
	public Object getId()
	{
		return null;
	}

	/**
	 * @return 当前的流水号计数
	 */
	public java.lang.Long getIndexNum()
	{
		return indexNum;
	}

	/**
	 * @return 流水号最大允许的计数，达到改数后从1开始循环
	 */
	public java.lang.Long getModMaxNum()
	{
		return modMaxNum;
	}

	/**
	 * @return 流水号名称
	 */
	public java.lang.String getName()
	{
		return name;
	}

	/**
	 * @param cacheCount 缓存的流水号个数，即每次从持久层获取的流水号个数
	 */
	public void setCacheCount(java.lang.Integer cacheCount)
	{
		this.cacheCount = cacheCount;
	}

	/**
	 * @param indexNum 当前的流水号计数
	 */
	public void setIndexNum(java.lang.Long indexNum)
	{
		this.indexNum = indexNum;
	}

	/**
	 * @param modMaxNum 流水号最大允许的计数，达到改数后从1开始循环
	 */
	public void setModMaxNum(java.lang.Long modMaxNum)
	{
		this.modMaxNum = modMaxNum;
	}

	/**
	 * @param name 流水号名称
	 */
	public void setName(java.lang.String name)
	{
		this.name = name;
	}
}